package com.example.test.test;

import com.mysql.jdbc.util.ReadAheadInputStream;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @Description: 读取application.properties 配置信息
 * @Author: 明天
 * @CreateDate: 2018/12/28$ 15:03$
 * @UpdateDate: 2018/12/28$ 15:03$
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public class ReadApplication {

    public  static final String url="application.properties";

    public static void main(String[] args) throws IOException {
        Properties properties=new Properties();
        InputStream is= ReadApplication.class.getClassLoader().getResourceAsStream(url);
        properties.load(is);
        System.out.println(properties.getProperty("testurl"));
    }
}
